#include <stdio.h>
#include "processhub.h"
#include "rf/event/RFEventManager.h"
#include "rf/event/RFTimerFired.h"

using namespace ProcessRouter;

int main(int argc, char* argv[])
{
    struct sigaction sa;
    sa.sa_handler = SIG_IGN;
    sigaction( SIGPIPE, &sa, 0 );

    Rooftop::SystemTimerFired *timer = Rooftop::SystemTimerFired::getInstance();
    SetLogLevel(LALL);

    ProcessHub *phub = NULL; 

    if (argc >= 2)
        phub = ProcessHub::instance(argv[1]);
    else
        phub = ProcessHub::instance();
    
    phub->bind();

    timer->start();

    return 0;
}
